package com.zeroone.star.publish.controller;


import com.zeroone.star.project.vo.JsonVO;
import com.zeroone.star.publish.entity.Contact;
import com.zeroone.star.publish.service.impl.ContactServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author car
 * @since 2024-03-02
 */
@RestController
@RequestMapping("/publish/contact")
public class ContactController {
    @Autowired
    private ContactServiceImpl contactService;


    @GetMapping("/selectContactById")
    @ApiOperation("查找某人的联系人")
    public JsonVO<List<Contact>> selectContactById(Integer userId){
        List<Contact> contacts = contactService.selectContactById(userId);
        return JsonVO.success(contacts);
    }
}

